package com.pasabahceambalaj.entity;

// Generated Oct 8, 2013 12:01:41 AM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * Isemir generated by hbm2java
 */
@Entity
@Table(name = "isemir", catalog = "ambalaj", uniqueConstraints = { @UniqueConstraint(columnNames = "isemirno"), @UniqueConstraint(columnNames = { "firmaid", "isemirno" }) })
public class Isemir implements java.io.Serializable {

	private Long id;
	private int version;
	private Firma firma;
	private Ulke ulke;
	private Isletme isletme;
	private Urun urun;
	private Musteri musteri;
	private String isemirno;
	private Date isemirtarihi;
	private String siparisno;
	private String kalipeki;
	private Date termintarihi;
	private long planlananadet;
	private String aypaciklama;
	private String upkaciklama;
	private String musterimarkalamasi;
	private String uretimenotlar;
	private String formno;
	private Set<Isemirhareket> isemirhareketsForVirmanisemirid = new HashSet<Isemirhareket>(0);
	private Set<Isemirhareket> isemirhareketsForIsemirid = new HashSet<Isemirhareket>(0);
	private Set<Isemirurun> isemiruruns = new HashSet<Isemirurun>(0);
	private Set<Isemirmalzeme> isemirmalzemes = new HashSet<Isemirmalzeme>(0);
	private Set<Isemirbarkod> isemirbarkods = new HashSet<Isemirbarkod>(0);
	private Set<Isemiretut> isemiretuts = new HashSet<Isemiretut>(0);

	public Isemir() {
	}

	public Isemir(Firma firma, Isletme isletme, Urun urun, String isemirno, Date isemirtarihi, String siparisno, Date termintarihi, long planlananadet) {
		this.firma = firma;
		this.isletme = isletme;
		this.urun = urun;
		this.isemirno = isemirno;
		this.isemirtarihi = isemirtarihi;
		this.siparisno = siparisno;
		this.termintarihi = termintarihi;
		this.planlananadet = planlananadet;
	}

	public Isemir(Firma firma, Ulke ulke, Isletme isletme, Urun urun, Musteri musteri, String isemirno, Date isemirtarihi, String siparisno, String kalipeki, Date termintarihi, long planlananadet, String aypaciklama, String upkaciklama, String musterimarkalamasi, String uretimenotlar, String formno, Set<Isemirhareket> isemirhareketsForVirmanisemirid, Set<Isemirhareket> isemirhareketsForIsemirid, Set<Isemirurun> isemiruruns, Set<Isemirmalzeme> isemirmalzemes, Set<Isemirbarkod> isemirbarkods, Set<Isemiretut> isemiretuts) {
		this.firma = firma;
		this.ulke = ulke;
		this.isletme = isletme;
		this.urun = urun;
		this.musteri = musteri;
		this.isemirno = isemirno;
		this.isemirtarihi = isemirtarihi;
		this.siparisno = siparisno;
		this.kalipeki = kalipeki;
		this.termintarihi = termintarihi;
		this.planlananadet = planlananadet;
		this.aypaciklama = aypaciklama;
		this.upkaciklama = upkaciklama;
		this.musterimarkalamasi = musterimarkalamasi;
		this.uretimenotlar = uretimenotlar;
		this.formno = formno;
		this.isemirhareketsForVirmanisemirid = isemirhareketsForVirmanisemirid;
		this.isemirhareketsForIsemirid = isemirhareketsForIsemirid;
		this.isemiruruns = isemiruruns;
		this.isemirmalzemes = isemirmalzemes;
		this.isemirbarkods = isemirbarkods;
		this.isemiretuts = isemiretuts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "firmaid", nullable = false)
	@NotNull
	public Firma getFirma() {
		return this.firma;
	}

	public void setFirma(Firma firma) {
		this.firma = firma;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ulkeid")
	public Ulke getUlke() {
		return this.ulke;
	}

	public void setUlke(Ulke ulke) {
		this.ulke = ulke;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "isletmeid", nullable = false)
	@NotNull
	public Isletme getIsletme() {
		return this.isletme;
	}

	public void setIsletme(Isletme isletme) {
		this.isletme = isletme;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "urunid", nullable = false)
	@NotNull
	public Urun getUrun() {
		return this.urun;
	}

	public void setUrun(Urun urun) {
		this.urun = urun;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "musteriid")
	public Musteri getMusteri() {
		return this.musteri;
	}

	public void setMusteri(Musteri musteri) {
		this.musteri = musteri;
	}

	@Column(name = "isemirno", unique = true, nullable = false)
	@NotNull
	public String getIsemirno() {
		return this.isemirno;
	}

	public void setIsemirno(String isemirno) {
		this.isemirno = isemirno;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "isemirtarihi", nullable = false, length = 10)
	@NotNull
	public Date getIsemirtarihi() {
		return this.isemirtarihi;
	}

	public void setIsemirtarihi(Date isemirtarihi) {
		this.isemirtarihi = isemirtarihi;
	}

	@Column(name = "siparisno", nullable = false)
	@NotNull
	public String getSiparisno() {
		return this.siparisno;
	}

	public void setSiparisno(String siparisno) {
		this.siparisno = siparisno;
	}

	@Column(name = "kalipeki")
	public String getKalipeki() {
		return this.kalipeki;
	}

	public void setKalipeki(String kalipeki) {
		this.kalipeki = kalipeki;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "termintarihi", nullable = false, length = 10)
	@NotNull
	public Date getTermintarihi() {
		return this.termintarihi;
	}

	public void setTermintarihi(Date termintarihi) {
		this.termintarihi = termintarihi;
	}

	@Column(name = "planlananadet", nullable = false)
	public long getPlanlananadet() {
		return this.planlananadet;
	}

	public void setPlanlananadet(long planlananadet) {
		this.planlananadet = planlananadet;
	}

	@Column(name = "aypaciklama", length = 16777215)
	@Length(max = 16777215)
	public String getAypaciklama() {
		return this.aypaciklama;
	}

	public void setAypaciklama(String aypaciklama) {
		this.aypaciklama = aypaciklama;
	}

	@Column(name = "upkaciklama", length = 16777215)
	@Length(max = 16777215)
	public String getUpkaciklama() {
		return this.upkaciklama;
	}

	public void setUpkaciklama(String upkaciklama) {
		this.upkaciklama = upkaciklama;
	}

	@Column(name = "musterimarkalamasi", length = 16777215)
	@Length(max = 16777215)
	public String getMusterimarkalamasi() {
		return this.musterimarkalamasi;
	}

	public void setMusterimarkalamasi(String musterimarkalamasi) {
		this.musterimarkalamasi = musterimarkalamasi;
	}

	@Column(name = "uretimenotlar", length = 16777215)
	@Length(max = 16777215)
	public String getUretimenotlar() {
		return this.uretimenotlar;
	}

	public void setUretimenotlar(String uretimenotlar) {
		this.uretimenotlar = uretimenotlar;
	}

	@Column(name = "formno")
	public String getFormno() {
		return this.formno;
	}

	public void setFormno(String formno) {
		this.formno = formno;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemirByVirmanisemirid")
	public Set<Isemirhareket> getIsemirhareketsForVirmanisemirid() {
		return this.isemirhareketsForVirmanisemirid;
	}

	public void setIsemirhareketsForVirmanisemirid(Set<Isemirhareket> isemirhareketsForVirmanisemirid) {
		this.isemirhareketsForVirmanisemirid = isemirhareketsForVirmanisemirid;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemirByIsemirid")
	public Set<Isemirhareket> getIsemirhareketsForIsemirid() {
		return this.isemirhareketsForIsemirid;
	}

	public void setIsemirhareketsForIsemirid(Set<Isemirhareket> isemirhareketsForIsemirid) {
		this.isemirhareketsForIsemirid = isemirhareketsForIsemirid;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemir")
	public Set<Isemirurun> getIsemiruruns() {
		return this.isemiruruns;
	}

	public void setIsemiruruns(Set<Isemirurun> isemiruruns) {
		this.isemiruruns = isemiruruns;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemir")
	public Set<Isemirmalzeme> getIsemirmalzemes() {
		return this.isemirmalzemes;
	}

	public void setIsemirmalzemes(Set<Isemirmalzeme> isemirmalzemes) {
		this.isemirmalzemes = isemirmalzemes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemir")
	public Set<Isemirbarkod> getIsemirbarkods() {
		return this.isemirbarkods;
	}

	public void setIsemirbarkods(Set<Isemirbarkod> isemirbarkods) {
		this.isemirbarkods = isemirbarkods;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "isemir")
	public Set<Isemiretut> getIsemiretuts() {
		return this.isemiretuts;
	}

	public void setIsemiretuts(Set<Isemiretut> isemiretuts) {
		this.isemiretuts = isemiretuts;
	}

}
